import urllib.request
import gevent
from gevent import monkey
monkey.patch_all()

def downloader(img_name,img_utl):
    req=urllib.request.urlopen(img_utl)
    img_content=req.read()
    with open(img_name,'wb') as f:
        f.write(img_content)

def main():
    gevent.joinall([
        gevent.spawn(downloader,'1.jpg','http://bpic.588ku.com//back_origin_min_pic/19/07/03/c3058785f896c31a94c4d392289d7b42.jpg!/fw/750/quality/99/unsharp/true/compress/true'),
        gevent.spawn(downloader,'2.jpg','//bpic.588ku.com//back_water_img/19/07/23/16e1186b39b60b14027e1220141fac8295.jpg!/fw/750/quality/99/unsharp/true/compress/true')
    ])

if __name__ == '__main__':
    main()